package org.cos.verification.verifier;

import java.util.Calendar;
import java.util.TimeZone;

public class StatisticAnalyzer {
	
	private StatisticAnalyzer(){};
	
	static StatisticAnalyzer instance;
	public static StatisticAnalyzer getInstance()
	{
		if(instance == null)
			instance = new StatisticAnalyzer();
		return instance;
	} 
	
	public int getRuleCount() {
		return 100;
	}
	
	public String getVersion() {
		return "0.0.0.1";
	}
	
	public String getLastVisitTime() {
		TimeZone t = TimeZone.getDefault();// 获取时区 设置默认

		Calendar c = Calendar.getInstance(t);// 创建Calendar 对象

		String strYear = String.valueOf(c.get(Calendar.YEAR)); 
		String strMonth = String.valueOf(c.get(Calendar.MONTH) + 1); 
		String strDate = String.valueOf(c.get(Calendar.DATE)); 

		String time = c.get(Calendar.HOUR) + ":" + c.get(Calendar.MINUTE) + ":"
				+ c.get(Calendar.SECOND);
		return strYear + "/" +  strMonth + "/" + strDate+ " " + time;
	}
}
